import cv2
import Road_Detection as rd

cap = cv2.VideoCapture('test_video/video_3.mp4')
while True:
    _, frame = cap.read()
    detect = rd.detect_image(frame)
    cv2.imshow('road-line', detect[0])
    cv2.waitKey(1)
    key = cv2.waitKey(1) & 0xFF
    # 按键 "q" 退出
    if key == ord('q') or key == 27:
        break
#
# out.release()
cap.release()
cv2.destroyAllWindows()

